import Vue from "vue";
// import VueRouter from "vue-router";
import VueRouter from "@/vue_router_self";
import Home from "../views/Home.vue";
import About from "../views/About.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/about",
    name: "About",
    component: About,
    children: [
      {
        path: "a",
        component: {
          reder () {
            return <h1>about aaaaaaa</h1>
          }
        }
      },
      {
        path: "b",
        component: {
          reder () {
            return <h1>about bbbbbbbbbbb</h1>
          }
        }
      }
    ]
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    
  },
];

const router = new VueRouter({
  mode: "hash",
  base: process.env.BASE_URL,
  routes,
});

export default router;

